package com.yanqu.road.entity.activity.springdinner.cross;

import com.yanqu.road.entity.DataObject;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class RedPacketTable extends DataObject {

    private int activityId;

    private int no;

    private long userId;

    private long serverId;

    private String message;

    private Map<Long, RobRedPacketUser> robUserMap = new ConcurrentHashMap<>();

    private int value;

    private int remainValue;

    //0开始1结束
    private int status;

    private long openTime;

    private long overTime;

    private long updateTime;

    private boolean overTable = false;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        this.serverId = serverId;
    }


    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Map<Long, RobRedPacketUser> getRobUserMap() {
        return robUserMap;
    }

    public void setRobUserMap(Map<Long, RobRedPacketUser> robUserMap) {
        this.robUserMap = robUserMap;
        setUpdateOption();
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        if(status != this.status){
            this.status = status;
            setUpdateOption();
        }
    }

    public long getOpenTime() {
        return openTime;
    }

    public void setOpenTime(long openTime) {
        if(openTime != this.openTime){
            this.openTime = openTime;
            setUpdateOption();
        }
    }

    public long getOverTime() {
        return overTime;
    }

    public void setOverTime(long overTime) {
        if(overTime != this.overTime){
            this.overTime = overTime;
            setUpdateOption();
        }
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public int getRemainValue() {
        return remainValue;
    }

    public void setRemainValue(int remainValue) {
        if(remainValue != this.remainValue){
            this.remainValue = remainValue;
            setUpdateOption();
        }
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        if(updateTime != this.updateTime){
            this.updateTime = updateTime;
            setUpdateOption();
        }
    }

    public boolean isOverTable() {
        return overTable;
    }

    public void setOverTable(boolean overTable) {
        this.overTable = overTable;
    }
}
